Skip to content

Implement SHA3 hash benchmarks (224/256/384/512) - #499

Merged
bigbrett merged 2 commits into
wolfSSL:mainfrom
kojiws:fix_sha3_benchmark
Aug 7, 2026
Merged

Implement SHA3 hash benchmarks (224/256/384/512)#499
bigbrett merged 2 commits into
wolfSSL:mainfrom
kojiws:fix_sha3_benchmark

Conversation

@kojiws

@kojiws kojiws commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables the SHA3 benchmarks in benchmark/bench_modules/wh_bench_mod_sha3.c,
which were stubs returning WH_ERROR_NOTIMPL and silently -> SKIPPED.
Covers all four variants (224/256/384/512), DMA and non-DMA. SHA3 entries
switched from BENCH_THROUGHPUT_NONE to XBPS so throughput is reported.
HMAC-SHA3 is out of scope and stays SKIPPED.

Test

make DMA=1: all eight SHA3 rows report; previously two were SKIPPED and
six did not exist. make (non-DMA): the four non-DMA rows report.

@kojiws kojiws self-assigned this Jul 28, 2026
@kojiws
kojiws force-pushed the fix_sha3_benchmark branch from e83f149 to d7727b1 Compare July 29, 2026 06:48
@kojiws kojiws changed the title Fix SHA3 benchmarking Implement SHA3 hash benchmarks (224/256/384/512) Jul 29, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #499

No scan targets match the changed files in this PR. Review skipped.

@kojiws kojiws assigned wolfSSL-Bot and unassigned kojiws Jul 30, 2026
Comment thread benchmark/bench_modules/wh_bench_mod_sha3.c Outdated
@bigbrett bigbrett assigned kojiws and unassigned wolfSSL-Bot Aug 3, 2026
@kojiws kojiws assigned wolfSSL-Bot and unassigned kojiws Aug 6, 2026
@kojiws
kojiws requested a review from bigbrett August 6, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables SHA3 hashing benchmarks across all four digest sizes (224/256/384/512) and both DMA/non-DMA paths, replacing prior stubs that caused SHA3 benchmarks to be skipped. It also updates the benchmark registration so SHA3 results report throughput (bytes/sec) like other hash benchmarks.

Changes:

  • Adds per-variant SHA3 benchmark module indices (224/256/384/512, plus DMA variants) behind the appropriate wolfSSL feature macros.
  • Implements SHA3 benchmark modules using wolfCrypt wc_Sha3_* APIs with a shared internal helper to reduce duplication.
  • Switches SHA3 benchmark throughput type from BENCH_THROUGHPUT_NONE to BENCH_THROUGHPUT_XBPS so throughput is reported.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
benchmark/wh_bench.c Registers SHA3-224/256/384/512 (+ DMA) modules conditionally and enables throughput reporting for SHA3 benches.
benchmark/bench_modules/wh_bench_mod_sha3.c Implements SHA3 benchmark functions for 224/256/384/512 and DMA/non-DMA via a shared helper and per-variant ops table.
benchmark/bench_modules/wh_bench_mod_all.h Adds prototypes for the new SHA3-224/384/512 benchmark module functions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bigbrett
bigbrett merged commit 8e7820b into wolfSSL:main Aug 7, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants